/**
 * Movies Card Styles
 * 
 * CSS Module for the movies card component.
 * Provides responsive grid layout for the movies listing page.
 */

.pageHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.selectionControls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.searchControls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.searchButton {
  padding: 0.75rem 1.5rem;
  background: #0070f3;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
}

.searchButton:hover:not(:disabled) {
  background: #0051cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 112, 243, 0.3);
}

.searchButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.clearSearchButton {
  padding: 0.5rem 1rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clearSearchButton:hover:not(:disabled) {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Search Pagination Styles */
.pagination {
  margin: 3rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.paginationContainer {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pageButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #0070f3;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  min-width: fit-content;
  cursor: pointer;
}

.pageButton:hover:not(.disabled):not(:disabled) {
  background: #0070f3;
  color: white;
  border-color: #0070f3;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 112, 243, 0.2);
}

.pageButton.disabled,
.pageButton:disabled {
  background: #f5f5f5;
  color: #999;
  border-color: #eee;
  cursor: not-allowed;
  opacity: 0.6;
}

.pageInfo {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.additionalInfo {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

.searchInfo {
  margin: 2rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.selectAllButton {
  padding: 0.5rem 1rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.selectAllButton:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.batchDeleteButton {
  padding: 0.5rem 1rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.batchDeleteButton:hover:not(:disabled) {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.batchDeleteButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.batchUpdateButton {
  padding: 0.5rem 1rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.batchUpdateButton:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.batchUpdateButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.confirmationOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.confirmationDialog {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.confirmationTitle {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.confirmationMessage {
  margin: 0 0 1.5rem 0;
  color: #666;
  text-align: center;
  line-height: 1.5;
}

.confirmationActions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cancelButton {
  padding: 0.75rem 1.5rem;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.cancelButton:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.confirmDeleteButton {
  padding: 0.75rem 1.5rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.confirmDeleteButton:hover:not(:disabled) {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.confirmDeleteButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pageTitle {
  margin: 0;
  font-size: 32px;
  color: #333;
}

.addButton {
  padding: 0.75rem 1.5rem;
  background: #0070f3;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

.addButton:hover:not(:disabled) {
  background: #0051cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 112, 243, 0.3);
}

.addButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.successMessage {
  background-color: #d1edff;
  border: 1px solid #b8e6ff;
  color: #0c5aa6;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 500;
}

.errorMessage {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 500;
}

.moviesGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1200px;
}

.noMovies {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pageHeader {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .headerActions {
    flex-direction: column;
    gap: 12px;
  }

  .selectionControls {
    justify-content: center;
  }

  .searchControls {
    justify-content: center;
    width: 100%;
  }

  .pagination {
    margin: 2rem 0;
  }

  .paginationContainer {
    gap: 1rem;
  }

  .pageButton {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }

  .pageInfo {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
  }

  .pageTitle {
    font-size: 28px;
    text-align: center;
  }

  .addButton {
    width: 100%;
    padding: 0.875rem 1rem;
  }

  .confirmationDialog {
    margin: 20px;
    padding: 1.5rem;
  }

  .confirmationActions {
    flex-direction: column;
  }

  .cancelButton,
  .confirmDeleteButton {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .pageTitle {
    font-size: 24px;
  }

  .addButton {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .selectionControls {
    flex-direction: column;
    width: 100%;
  }

  .selectAllButton,
  .batchDeleteButton,
  .batchUpdateButton,
  .searchButton,
  .clearSearchButton {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .paginationContainer {
    gap: 0.5rem;
    width: 100%;
  }

  .pageButton {
    flex: 1;
    max-width: 120px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }

  .pageInfo {
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
  }

  .additionalInfo {
    font-size: 0.8rem;
  }
}
